CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(IR)
SET(CMAKE_CXX_COMPILER g++)
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -g")
ADD_DEFINITIONS(-D_LINUX_ -Wall)
AUX_SOURCE_DIRECTORY(../src/lib LIB)
AUX_SOURCE_DIRECTORY(../src/gen-cpp GENSRCS)
INCLUDE_DIRECTORIES(../src/gen-cpp/ /usr/local/include/boost/ /usr/local/include/thrift/)
LINK_DIRECTORIES(../src/lib/ ./  /usr/local/lib/)
ADD_EXECUTABLE(search_server ${LIB} ${GENSRCS} ../src/searcher.cc ../src/search_server.cc)
TARGET_LINK_LIBRARIES(search_server pthread thrift z)
SET(EXECUTABLE_OUTPUT_PATH  ../)
